git-lfs 用于版本控制大文件的开源git扩 展程序
git提交报错,原因是github限制单个文件不得大于100M
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 12 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 89.34 MiB | 2.76 MiB/s, done.
Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: Trace: 6a0adbfe8bf64ae8311f54ce09591384c6670642a7bf50cd919bcd665a3a1f25
remote: error: See https://gh.io/lfs for more information.
remote: error: File kvm/Linux KVM虚拟化架构实战指南.pdf is 100.06 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To github.com:pptfz/book-pdf.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'github.com:pptfz/book-pdf.git'
git-lfs
简介
git-lfs
是一个用于版本控制大文件的 开源git扩展程序,Git大文件存储(LFS)替换了大型文件,例如音频示例,视频,数据集和图形,并带有git中的文本指针,同时将文件内容存储在 github.com
或 github Enterprise
等远程服务器上
安装 git-lfs
- mac
- linux
brew install git-lfs
配置 git-lfs
启用 Git LFS
git lfs install